<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script>
    // 移动端适配rem单位
    document.documentElement.style.fontSize =
    document.documentElement.clientWidth / 37.5 + 'px';
  </script>
  <style>
    body {
      margin: 0;
    }

    html,
    body,
    #app {
      height: 100%;
    }
    div {
      display: flex;
      flex-direction: column;
      width: 100%;
    }

    .slider-page {
      position: relative;
      height: 100%;
      overflow: hidden;
    }

    .scroll-wrapper {
      position: absolute;
      flex-direction: row;
      width: 150rem; /* 暂时写死，(375 * 4)px */
      height: 100%;
    }

    .slider-item {
      flex: 1;
      height: 100%;
    }

    .slider-item .inner {
      align-items: center;
      justify-content: center;
      height: 100%;
      color: #fff;
      font-size: 5rem;
    }

    .slider-item:nth-child(1) {
      background-color: red;
    }
    .slider-item:nth-child(2) {
      background-color: blue;
    }
    .slider-item:nth-child(3) {
      background-color: orange;
    }
    .slider-item:nth-child(4) {
      background-color: green;
    }
  </style>
</head>
<body>
  <div id="app">
    <div class="slider-page">
      <div class="scroll-wrapper">
        <div class="slider-item">
          <div class="inner">PAGE-1</div>
        </div>
        <div class="slider-item">
          <div class="inner">PAGE-2</div>
        </div>
        <div class="slider-item">
          <div class="inner">PAGE-3</div>
        </div>
        <div class="slider-item">
          <div class="inner">PAGE-4</div>
        </div>
      </div>
    </div>
  </div>

  <!-- 实现移动端全屏滑动 -->
  <script src="./index.js"></script>
</body>
</html>